package org.jeecg.modules.power.user.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.power.user.entity.YlToken;

/**
 * @Description: yl_token
 * @Author: jeecg-boot
 * @Date:   2024-07-11
 * @Version: V1.0
 */
public interface YlTokenMapper extends BaseMapper<YlToken> {



    /**
     * 用户退出
     * @param token
     */
    @Delete("DELETE FROM yl_token WHERE token = #{token}")
    int delGasToken(String token);

    /**
     * 用户退出 基于userId
     * @param userId
     */
    @Delete("DELETE FROM yl_token WHERE user_id = #{userId}")
    void delGasTokenByUserId(String userId);



    @Select("SELECT * FROM yl_token WHERE token = #{token}")
    YlToken getToken(String token);

}
